<?php
namespace App\Models\Entity\bqhot;

use Swoft\Db\Model;
use Swoft\Db\Bean\Annotation\Column;
use Swoft\Db\Bean\Annotation\Entity;
use Swoft\Db\Bean\Annotation\Id;
use Swoft\Db\Bean\Annotation\Required;
use Swoft\Db\Bean\Annotation\Table;
use Swoft\Db\Types;

/**
 * 用户表

 * @Entity(instance="bqhot.master")
 * @Table(name="bqhot_user")
 * @uses      User
 */
class User extends Model
{
    /**
     * @var int $uid 
     * @Id()
     * @Column(name="uid", type="integer")
     */
    private $uid;

    /**
     * @var string $username 
     * @Column(name="username", type="string", length=20, default="")
     */
    private $username;

    /**
     * @var string $password 
     * @Column(name="password", type="string", length=36)
     */
    private $password;

    /**
     * @var string $email 
     * @Column(name="email", type="string", length=36, default="")
     */
    private $email;

    /**
     * @var int $regtime 
     * @Column(name="regtime", type="integer")
     * @Required()
     */
    private $regtime;

    /**
     * @param int $value
     * @return $this
     */
    public function setUid(int $value)
    {
        $this->uid = $value;

        return $this;
    }

    /**
     * @param string $value
     * @return $this
     */
    public function setUsername(string $value): self
    {
        $this->username = $value;

        return $this;
    }

    /**
     * @param string $value
     * @return $this
     */
    public function setPassword(string $value): self
    {
        $this->password = $value;

        return $this;
    }

    /**
     * @param string $value
     * @return $this
     */
    public function setEmail(string $value): self
    {
        $this->email = $value;

        return $this;
    }

    /**
     * @param int $value
     * @return $this
     */
    public function setRegtime(int $value): self
    {
        $this->regtime = $value;

        return $this;
    }

    /**
     * @return mixed
     */
    public function getUid()
    {
        return $this->uid;
    }

    /**
     * @return string
     */
    public function getUsername()
    {
        return $this->username;
    }

    /**
     * @return string
     */
    public function getPassword()
    {
        return $this->password;
    }

    /**
     * @return string
     */
    public function getEmail()
    {
        return $this->email;
    }

    /**
     * @return int
     */
    public function getRegtime()
    {
        return $this->regtime;
    }

}
